/**
 * @Description : _toastr.js
 * @Author : Tomi
 * @Email : lintaoming@qq.com
 * @Create : 2017/8/31
 */
(function(window, $, undefined){
    'use strict';
    $(window.document).ready(function(){
        $('[dy8-unit="toastr"]').each(function(i,e){
            var $e = $(e),
                options = {
                    status: 'info',
                    event: 'click',
                };

            $.extend(options, $e.data());

            $e.on(options.event, function(){
                toastr[options.status](options.content, options.title, options);
            });
        });
    });
})(window, jQuery);